//
//  KDCommentCell.m
//  WangJingApp
//
//  Created by 魏强 on 17/2/10.
//  Copyright © 2017年 KDTech. All rights reserved.
//

#import "KDCommentCell.h"
@interface KDCommentCell ()
@property (weak, nonatomic) IBOutlet UIButton *nameBtn;
@property (weak, nonatomic) IBOutlet UILabel *timeLb;
@property (weak, nonatomic) IBOutlet UILabel *commentLb;
/**  单位Lb */
@property (weak, nonatomic) IBOutlet UIButton *unitBtn;

@end
@implementation KDCommentCell

#pragma mark - 生命周期区
+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    NSString *cellId =@"KDCommentCell";
    KDCommentCell *cell =[tableView dequeueReusableCellWithIdentifier:cellId];
    if (cell == nil)
    {
        cell =[[[NSBundle mainBundle]loadNibNamed:cellId owner:self options:nil]lastObject];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        cell.nameBtn.layer.cornerRadius = 3;
        cell.nameBtn.clipsToBounds = YES;
    }
    //    cell.contentView.backgroundColor = BackGroundColor;
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}
- (void)setModel:(KDComment *)model{
    _model = model;
    [self.nameBtn setTitle:model.subsName forState:UIControlStateNormal];
    self.timeLb.text = model.time;
    self.commentLb.text = model.content;
    [self.unitBtn setTitle:model.compName forState:UIControlStateDisabled];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
